# -*- coding:utf-8 -*-

from PySide.QtGui import *
from PySide.QtCore import *
import sys

QTextCodec.setCodecForTr(QTextCodec.codecForName("utf8"))

class MainSplitWindow(QMainWindow):
    def __init__(self,parent=None):
        super(MainSplitWindow,self).__init__(parent)
        font=QFont(self.tr("黑体"),12)
        QApplication.setFont(font)
        ##分隔窗体
        mainSplitter=QSplitter(Qt.Horizontal,self)
        ##注意文体框添加到mainSplitter
        leftText=QTextEdit(self.tr("左边窗口"),mainSplitter)
        leftText.setAlignment(Qt.AlignCenter)

        rightSplitter=QSplitter(Qt.Vertical,mainSplitter)
        rightSplitter.setOpaqueResize(False)
        upText=QTextEdit(self.tr("右边窗口"),rightSplitter)
        downText=QTextEdit(self.tr("右边窗口二"),rightSplitter)

        mainSplitter.setStretchFactor(1,1)
        self.setCentralWidget(mainSplitter)


if __name__=="__main__":
    app=QApplication(sys.argv)
    mainSplitWindow=MainSplitWindow()
    mainSplitWindow.show()
    sys.exit(app.exec_())